import axios from '../../axios.js';
const ADMINS = '/admins';
const admins = {
    /******************黄涛*************** */
    //管理编辑出租方的信息
    getLessors(data) {
        return axios({
            url: ADMINS + "/getLessors",
            method: "post",
            data
        });
    },
    modifyLessors(data) { //单独更新出租方的state状态
        return axios({
            url: ADMINS + "/modifyLessors",
            method: "post",
            data
        });
    },

    //Editlessors
       EditLessors(data){
        return axios({
            url: ADMINS + "/EditLessors",
            method: "post",
            data
        });
      },
      

    deleteLessors(datas) {
        return axios({
            url: ADMINS + "/deleteLessors",
            method: "post",
            data: {
                _id: datas
            }
        });
    },


    /********对车位的管理**********/


    getParkings(data) {
        return axios({
            url: ADMINS + "/getParkings",
            method: "post",
            data
        });
    },
    modifyParkings(data) { //单独更新出租方的state状态
        return axios({
            url: ADMINS + "/modifyParkings",
            method: "post",
            data
        });
    },

       //EditParkings
       EditParkings(data){
        return axios({
            url: ADMINS + "/EditParkings",
            method: "post",
            data
        });
      },
    deleteParkings(datas) {
        return axios({
            url: ADMINS + "/deleteParkings",
            method: "post",
            data: {
                _id: datas
            }
        });
    },


    //管理员租客的基本信息
    getTenants(data) {
        return axios({
            url: ADMINS + "/getTenants",
            method: "post",
            data
        });
    },
    deleteTenants(datas) {
        return axios({
            url: ADMINS + "/deleteTenants",
            method: "post",
            data: {
                _id: datas
            }
        });
    },
   //EditTenants
   EditTenants(data){
    return axios({
        url: ADMINS + "/EditTenants",
        method: "post",
        data
    });
  },

//修改租客的认证状态
    modifyTenants(data) {
        return axios({
            url: ADMINS + "/modifyTenants",
            method: "post",
            data
        });
    },


    /******************黄涛*************** */
    //其他


    //获取普通管理员数据
    getAdmins(params) {
        return axios({
            url: ADMINS + "/getAdmins",
            method: "get",
            params
        });
    },
    //修改普通管理员数据
    modifyAdmins(data) {
        return axios({
            url: ADMINS + "/modifyAdmins",
            method: "post",
            data
        });
    },
    //删除普通管理员数据
    deleteAdmins(data) {
        return axios({
            url: ADMINS + "/deleteAdmins",
            method: "post",
            data
        });
    },
    //查找普通管理员
    seekAdmins(data) {
        return axios({
            url: ADMINS + "/seekAdmins",
            method: "post",
            data
        });
    },
    //禁用或启用管理员
    forbidAdmins(data) {
        return axios({
            url: ADMINS + "/forbidAdmins",
            method: "post",
            data
        });
    },
    //新增普通管理员
    addAdmins(data){
        return axios({
            url: ADMINS + "/addAdmins",
            method: "post",
            data
        });
    },
    //验证新增管理员账号，是否存在
    isAdmins(data){
        return axios({
            url: ADMINS + "/isAdmins",
            method: "post",
            data
        });
    }
}
export default admins;